import instance from "@/utils/request";

// 角色下拉选渲染接口
export const roleSelect = ()=> instance.get("/roles/select")

// 角色列表
export const roleList = (searchForm)=> instance.post("/roles/list",searchForm)

//添加或更新角色信息
export const saveUpdate = (roleForm)=> instance.post("/roles/saveOrUpdate",roleForm)

// 根据角色id  查询角色信息
export const getRoleById = (rid)=> instance.get("/roles/"+rid)

// 根据角色id 删除角色信息
export const deleteRoleById = (rid)=> instance.delete("/roles/"+rid)

// 根据角色id 查询角色权限信息
export const getPermissionsByRoleId = (rid)=> instance.get("/roles/permissions/"+rid)

// 根据角色id  添加角色权限信息
export const addPermissionsByRoleId = (permission)=> instance.post("/roles/addPermissions",permission)




